package com.tutu.commons.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Program: b2c-cloud-store
 * @Description: 用户收藏实体类
 * @Author: JK.TuTu
 * @Version: 1.0
 * @Create: 2022-12-20 16:41
 **/
@Data
@TableName("collect")
public class Collect implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;  //用户收藏ID

    @NotNull(message = "用户ID不可为空")
    @TableField("user_id")
    private Integer userId;  //用户ID

    @NotNull(message = "商品ID不可为空")
    @TableField("product_id")
    private Integer productId;  //产品ID

    @TableField("collect_time")
    private Long collectTime;  //收藏时间
}
